package dailytest;

import java.util.ArrayList;
import java.util.List;
import java.util.StringJoiner;

/**
 * @author: heweiwei
 * @Date: 2022/12/1 18:55
 * @Desc:
 */
public class StringJoinerTest {

    public static void main(String[] args) {
        int a = 1, b = 2, c = 3, d = 4;
        List<StringJoiner> errorMessageList = new ArrayList<>();
        for (int i = 0; i < 3; i++) {
            boolean check = Boolean.TRUE;
            StringJoiner errorMessage = new StringJoiner(";", "入库单号:" + i + "【", "】");
            if (a != 2) {
                errorMessage.add("非采购入库类型");
                check = Boolean.FALSE;
            }
            if (b != 3) {
                errorMessage.add("已经发生过回传");
                check = Boolean.FALSE;
            }
            if (c != 4) {
                errorMessage.add("未审核");
                check = Boolean.FALSE;
            }
            if (d != 5) {
                errorMessage.add("对应的采购单为冲销单");
                check = Boolean.FALSE;
            }
            if (!check) {
                errorMessageList.add(errorMessage);
            }
        }
        System.out.println("errorMessageList = " + errorMessageList);
    }
}
